﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Intel_Client_GUI
{
	/// <summary>
	/// Interaction logic for MainWindow.xaml
	/// </summary>
	public partial class MainWindow : Window
	{
		public MainWindow()
		{
			this.InitializeComponent();

			// Insert code required on object creation below this point.

		}

		private void Window_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
		{
			// 在此处添加事件处理程序实现。
			if(e.ButtonState == MouseButtonState.Pressed)
				this.DragMove();

		}
		private void SysChecked(object sender, System.Windows.RoutedEventArgs e)
		{
			// 在此处添加事件处理程序实现。
			this.frame1.NavigationService.Navigate(new Uri("Intel.Client.GUI;component/Views/SysInfoPage.xaml", UriKind.Relative));
		}
		private void PluginChecked(object sender, System.Windows.RoutedEventArgs e)
		{
			// 在此处添加事件处理程序实现。
			this.frame1.NavigationService.Navigate(new Uri("Intel.Client.GUI;component/Views/PluginPage.xaml", UriKind.Relative));
		}
		private void HotKeyChecked(object sender, System.Windows.RoutedEventArgs e)
		{
			// 在此处添加事件处理程序实现。
			this.frame1.NavigationService.Navigate(new Uri("Intel.Client.GUI;component/Views/KeyHotChart.xaml", UriKind.Relative));
		}
		
		private void ProcessChecked(object sender, System.Windows.RoutedEventArgs e)
		{
			// 在此处添加事件处理程序实现。
			this.frame1.NavigationService.Navigate(new Uri("Intel.Client.GUI;component/Views/Process.xaml", UriKind.Relative));
		}
		private void PgDownloaderChecked(object sender, System.Windows.RoutedEventArgs e)
		{
			// 在此处添加事件处理程序实现。
			this.frame1.Navigate(new Uri("Intel.Client.GUI;component/Views/PageinDownLoader.xaml", UriKind.Relative));
		}
		private void NavigatingStart(object sender, System.Windows.Navigation.NavigatingCancelEventArgs e)
		{
			// 在此处添加事件处理程序实现。
			//if(!isLoad)
				//return;
			var s = this.Resources["OnNavigating"];
			if(s == null)
				return;
			System.Windows.Media.Animation.Storyboard sb =  s as System.Windows.Media.Animation.Storyboard;
			if(sb!=null)
			{
				sb.Begin();
			}
            
		}

		private void Window_Loaded(object sender, System.Windows.RoutedEventArgs e)
		{
			// 在此处添加事件处理程序实现。
			//this.isLoad=true;
            this.frame1.Navigate(new Uri("Intel.Client.GUI;component/Views/Process.xaml", UriKind.Relative));
		}

		

		

		

		


	}
}